package edu.jsnu.service.ticket.schedule.dao;

import edu.jsnu.service.ticket.schedule.domain.Schedule;
import edu.jsnu.service.ticket.schedule.dto.ScheduleBrief;
import edu.jsnu.service.ticket.schedule.dto.ScheduleShow;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface ScheduleMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Schedule record);

    int insertSelective(Schedule record);

    Schedule selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Schedule record);

    int updateByPrimaryKey(Schedule record);

    List<ScheduleShow> getSchedule();

    int deleteByFilmIds(int[] ids);

    int deleteByScheduleIds(@Param("ids") int[] ids);
    //参数为厅号，前台传来的日期时间
    List<Schedule> getScheduleByPlace(@Param("place") int place, @Param("dateStr") String dateStr);

    List<Schedule> getScheduleByPlace(int place);

    List<ScheduleBrief> getBriefSchedule(@Param("filmId") Integer filmId, @Param("month")String month, @Param("day")String day);

    List<Schedule> getScheduleByPlaceId(@Param("place") int place, @Param("dateStr") String dateStr);

    ScheduleShow getScheduleInfo(Integer scheduleId);

    Integer batchDel(Map<String, Integer[]> map);

    Integer deleteByFilmId(Integer id);
}